<style>
<!--
.andonAttribute dt{
width:110px;
}
-->
</style>
<div class="pageContent">
    <form method="post"
        action="${rc.getContextPath()}/manage/andonAttribute/saveAndonAttribute"
        class="pageForm required-validate"
        onsubmit="return checkFormInput(this);">
        <div class="pageFormContent andonAttribute"  >
          <div style="width:350px;float:left;">
            <input type="hidden" name="navTabId" value="${navTabId!''}">
            <input type="hidden" name="id"
                value="<#if (andonAttribute.attributeText)??>${andonAttribute.attributeCode!''}</#if>">
            <fieldset>
                <dl class="nowrap ">
                    <dt><@label key="andonAttributeCode.C,colon">ANDON属性编号：</@label></dt>
                    <dd>
                        <input name="attributeCode" value="<#if (andonAttribute.attributeCode)??>${andonAttribute.attributeCode!''}</#if>" 
                              size="22" type="text" maxlength="20" class="required  alphanumeric toUp" warn="<@label key='attributeCode.C,alreadyExists'>ANDON属性编号已存在</@label>"
                              readonly="readonly"
                        />
                    </dd>
                </dl>
                <dl class="nowrap">
                    <dt><@label key="andonAttributeText.C,colon">ANDON属性描述：</@label></dt>
                    <dd>
                        <input name="attributeText"
                            value="<#if (andonAttribute.attributeText)??>${andonAttribute.attributeText!''}</#if>"
                            size="22" type="text" maxlength="60" class="required" 
                              readonly="readonly"
                          />
                    </dd>
                </dl>
                <dl class="nowrap">
                    <dt><@label key="andonAttributeText.C,colon">ANDON属性描述：</@label></dt>
                    <dd>
                        <#if  ECode??&&(ECode?size>0)>
                        <select name="valueTypeEcode" class="required" disabled="disabled">
                
                                <#list ECode as eCode>
                                        <option value="${eCode.eCode!''}" 
                                            <#if eCode.eCode==andonAttribute.valueTypeEcode>
                                                selected="selected" 
                                            </#if>
                                            >
                                            ${eCode.eCodeText!''}
                                        </option>
                                </#list>
                        </select>
                        </#if>
                    </dd>
                </dl>
                <dl class="nowrap">
                    <dt>&nbsp;</dt>
                    <dd>
                        <label><input type="checkbox" name="lockFlag" value="1"
                            disabled="disabled"
                            <#if
                            (andonAttribute.requiredFlag)?? && (andonAttribute.requiredFlag == 1)>
                            checked="true"</#if>><@label key="required.C">必填</@label></label>
                    </dd>
                </dl>
                <dl class="nowrap">
                    <dt>&nbsp;</dt>
                    <dd>
                        <label><input type="checkbox" name="lockFlag" value="1"
                            disabled="disabled"
                            <#if
                            (andonAttribute.lockFlag)?? && (andonAttribute.lockFlag == 1)>
                            checked="true"</#if>><@label key="lock.C">锁定</@label></label>
                    </dd>
                </dl>
                <dl style="width: 350px; height: 90px;">
                    <dt><@label key='memo.C,colon'>备注：</@label></dt>
                    <dd>
                        <textarea style="width: 135px;" readonly="readonly" name="memo" maxlength="200" value="${andonAttribute.memo!''}" rows="4"><#if (andonAttribute.memo)??>${andonAttribute.memo!''}</#if></textarea>
                    </dd>
                </dl></fieldset>
                
            </div>
        
            <div id="rightPanel" style="float:left;width:220px;height:231px;
            <#if andonAttribute.attributeEnumList??&&(andonAttribute.attributeEnumList?size>0) >
            display:block;
            <#else>
            display:none;
            </#if>
            ">
                <div class="panelBar">
                    <ul class="toolBar" style="height:25px;">
                        <li style="width:200px;">
                        </li>
                    </ul>
                </div>
                <table  id="enumTable" layoutH="220" class="table canopration"    width="90%" >
                    <thead>
                        <tr>
                            <th style="width:140px;">枚举值</th>
                        </tr>
                    </thead>
                
                    <tBody id="enumTbody">
                    <#if andonAttribute.attributeEnumList??&&(andonAttribute.attributeEnumList?size>0) >
                        <#list andonAttribute.attributeEnumList as attributeEnum>
                            <tr>
                                <td>
                                    <input class="required" readonly="readonly" type='text' style='width:110px;height:19px;'name='attributeValue' value="${attributeEnum.attributeValue!''}" >
                                </td>
                            </tr>
                        </#list>
                    </#if>
                    </tBody>
                </table>
    
            </div>
        </div>    
        <#if andonAttribute??>
            <#assign createInfo=andonAttribute>
            <#include "/common/createInfo.html">
        </#if>
        <div class="formBar" >
            <ul>
                
                    <li>
                    <div class="buttonActive">
                        <div class="buttonContent">
                                <button type="button" class="close"><@label key="close.B">关闭</@label></button>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </form>

<script>

$(function(){
    
    var $select=$("select[name='valueTypeEcode']",$.pdialog.getCurrent());
    var $rightPanel=$("#rightPanel",$.pdialog.getCurrent());
    if($select.value==="ENUM")
    {
        $rightPanel.css("display","block");
    }
    
    $select.change(function()
        {
            if(this.value==='enum')
            {
                $rightPanel.css("display","block");
            }
            else
            {
                $rightPanel.css("display","none");
            }
        });
    
});
    
</script>
